<template>
    <div>
        <div class="item-box">
            <div class="items-detail" v-for="item in goodsList" :key="goodsList.id" >
                <img class="img-detail" :src=item.src alt=item.title>
                <div>{{item.title}}</div>
                <div>
                    <router-link :to="`/detail/${item.id}`"><button @click="addShoppingCar">添加购物车</button></router-link>
                </div>
            </div>
        </div>
    </div>
</template>
<script src="./detail.js" />
<style scoped src='./detail.css'>